home *** CD-ROM | disk | FTP | other *** search
/ Technotools / Technotools (Chestnut CD-ROM)(1993).ISO / lang_oth / mumps / mumps.txt
Text File  |  1986-12-23  |  21KB  |  450 lines

  1.  
  2.                         IS MUMPS FOR YOU?
  3.  
  4.                        by Melvin Goldstein
  5.  
  6. In this article you will learn about a computer language called
  7. MUMPS.  It does not contain the details of the MUMPS language,
  8. rather does it examine the question:  "IS MUMPS FOR YOU?" in such
  9. a manner that perhaps you will explore the references given at
  10. the end of this article and become a MUMPS user.
  11.  
  12. (Q) - What is the Standard MUMPS computer language?
  13.  
  14. (A) - The standard MUMPS computer language is a general purpose
  15. high level language (high level meaning more people friendly)
  16. designed to put information into the computer and retrieve infor-
  17. mation from the computer in a communicative dialogue with no
  18. delays.  It's many features make it ideal for text processing,
  19. communications and business applications where large complex
  20. records must be transferred, designed, constructed and main-
  21. tained.
  22.  
  23. (Q) - What does MUMPS stand for?
  24.  
  25. (A) - MUMPS was first developed at the Massachusetts General
  26. Hospital in Boston.  Its name stands for Massachusetts General
  27. Hospital Utility Multi-Programming System.  Although the language
  28. started in a hospital, the majority of its users are applying
  29. MUMPS to business.
  30.  
  31. (Q) - Why should you consider using MUMPS?
  32.  
  33. (A) - MUMPS is simple to learn and extremely powerful to use. 
  34. MUMPS gives the novice the tool to do a professional job on
  35. formidable programming applications.  Additionally, MUMPS gives
  36. the professional programmer a full set of software tools designed
  37. for real life tasks and problems he consistently encounters in
  38. the production and maintenance of application software.
  39.  
  40. MUMPS has three very important attributes:
  41.  
  42.      1) It is programmer productive.  Applications programs can
  43.      be written in one-half to one-fifth the time required with
  44.      other languages.  The more complex the program the greater
  45.      the productivity.
  46.  
  47.      2) Programs are transportable.  Applications code written on
  48.      Micros (small computers) will run on Mainframes (large
  49.      computers).  Likewise, we can demonstrate Main-frame soft-
  50.      ware running on Micros.  Develop and debug software at home
  51.      on your Micro, then move it to your Main-frame at the office
  52.      and it works!  This also means that you are not bound to a
  53.      specific vendor's hardware;  you may choose the most cost
  54.      effective solution.
  55.  
  56.      3) It lowers the threshold of dedication and or aptitude
  57.      necessary to write complex applications.  People who may not
  58.      become productive in other languages will find MUMPS a
  59.      welcome alternative.
  60.  
  61.  
  62. (Q) - What does it mean that MUMPS is an AMERICAN NATIONAL
  63. STANDARD INSTITUTE approved standard language?
  64.  
  65. (A) - All implementations of STANDARD MUMPS rigidly adhere to the
  66. MUMPS language standard using the same commands, functions, and
  67. operators;  therefore, programs can be transported between dif-
  68. ferent computers running STANDARD MUMPS.  This means that the
  69. user is not restricted to a single machine or software producer. 
  70. If a system grows it can be moved to a larger computer easily. 
  71. Sharing of applications software between users with different
  72. computers is possible.  Your applications software need no longer
  73. live or die with the machine on which you initially wrote and ran
  74. the program.
  75.  
  76.  
  77. (Q) - Who else is using MUMPS?
  78.  
  79. (A) - Thousands of business organizations throughout the world
  80. are using MUMPS.  Users are concentrated in the United States,
  81. Europe, United Kingdom, Japan, Asia, and South America.  There
  82. are formal User Groups in the United States, United Kingdom,
  83. Europe, Japan, and Brazil.  The MUG, the MUMPS User Group in the
  84. U.S., has an annual meeting (with over 5000 participants) where
  85. technical papers and tutorials are presented.  The MUG has had a
  86. dramatic growth in the past three years evidencing MUMPS's poten-
  87. tial for becoming a popular mainstay.  The MUG publishes a Quar-
  88. terly Magazine and various texts about MUMPS.
  89.  
  90.  
  91. (Q) - If MUMPS is so good why has it had so little press?
  92.  
  93. (A) - Several reasons:
  94.  
  95.      1) MUMPS was designed so it could run with good response
  96.      times on low resource hardware in a real-time environment. 
  97.      This was contrary to the big hardware suppliers interest. 
  98.      Fewer resources implied lower dollars, and transportability
  99.      was contrary to captive sale of hardware, so MUMPS had to
  100.      wait until the smaller companies offered low priced micro-
  101.      computer systems before there was a general availability.
  102.  
  103.      Languages become popular when they get the support of the
  104.      major hardware suppliers.  MUMPS' day is soon coming:  major
  105.      hardware suppliers are beginning to support the language as
  106.      the U.S. Government installs MUMPS systems as its required
  107.      data base/application programming language in all Veterans
  108.      Administration Hospitals.
  109.  
  110.      2) MUMPS has not been taught in many colleges -- this is
  111.      changing.
  112.  
  113.      3) System houses and corporate data processing departments
  114.      who use MUMPS have little incentive to advertise their lower
  115.      production costs.
  116.  
  117.      4) Few books have been published about MUMPS (perhaps for
  118.      the reasons above) -- this too is changing.
  119.  
  120.      MUMPS grew in spite of the lack of promotion or commercial
  121.      push and did so on its own inherent merits.
  122.  
  123.  
  124. (Q) - What makes MUMPS so good?
  125.  
  126. (A) - MUMPS has many features that transparently perform house-
  127. keeping functions which other languages require explicitly. 
  128. Housekeeping chores not only burden the programmer but are a
  129. constant source of errors.  Literature abounds with claims of
  130. rates of 10 lines of debugged code per man-day.  Not very
  131. impressive and many programmers would disagree.  However, since
  132. most software comes in late and over budget, one must give some
  133. credence to the literature.  MUMPS programs need less code per
  134. application which means fewer bugs and greater productivity.
  135.  
  136.  
  137. (Q) - Other than the house keeping chores what other features
  138. make MUMPS so good and reduce the amount of code per application?
  139.  
  140. (A) - All variables in MUMPS may be thought of as strings and the
  141. interpreter is smart enough to know how each string is to be
  142. used.  You do not have to make declarations as to the type or
  143. form of your data -- MUMPS knows when it must deal with the vari-
  144. ables and/or data as integers, alphas, numerics, or floating
  145. point types.  
  146.  
  147. There are no dimension declarations in MUMPS for arrays.  You do
  148. not have to declare the size of the array to reserve space for
  149. all potential values of the subscript.  MUMPS stores only the
  150. values as they are dynamically defined.  This type of array
  151. structure is known as a SPARSE ARRAY (as opposed to other systems
  152. which use DENSE ARRAYS).  If you have recorded a value of S(I)
  153. for I=1 and for I=100 only those values are stored in the sys-
  154. tem.  In DENSE ARRAYS, space would have to be reserved for all
  155. intermediate values (2-99) and thus use significantly more stor-
  156. age space.
  157. MUMPS, being string orientated, allows array subscripts to be
  158. alphas as well as numerics.  Variable names and line labels (line
  159. labels are optional) can be descriptive by the use of strings. 
  160. Example for Employee file:
  161.  
  162.     ^EMP(EMPNO,"NAM")= ...
  163.     ^EMP(EMPNO,"AGE")= ...
  164.     ^EMP(EMPNO,"SSNO")= ...........etc.
  165.  
  166. Easier to read, debug, and maintain.
  167.  
  168. MUMPS has a uniquely feature, PATTERN MATCHING, which compares a
  169. string with a desired pattern.  This powerful feature allows for
  170. the filtering of input data for conformity so that errors can
  171. readily be detected and immediately re-prompted at their source. 
  172. To test for a valid social security number you could use:
  173.  
  174.                   IF SSNO?3N1"-"2N1"-"4N
  175.  
  176. MUMPS includes an extensive set of powerful string handling
  177. features.  Searches, edits, extractions, and substrings are
  178. easily handled.  MUMPS has been termed as a string handling
  179. language.  MUMPS can operate routinely with variable length
  180. strings without the overhead burden (extensive program modifica-
  181. tion) required in most other languages.  If ZIP Codes changed
  182. from 5 numerics to 9 numerics, the only changes you would have to
  183. make in your MUMPS routines would be in the input filtering code
  184. (if you employed PATTERN MATCHING to trap errors), and to make
  185. sure that enough space for the additional characters existed on
  186. the output forms.
  187.  
  188. If one looks at a MUMPS program it will be evident that there are
  189. multiple instructions per line.  It allows for a more readable
  190. grouping of logic somewhat as literature uses a sentence to
  191. express an idea.  Some of the functions in MUMPS encourage this
  192. long line type structure and it has been argued that editing such
  193. code may be somewhat easier.
  194.  
  195. MUMPS has also been termed a DATA BASE LANGUAGE and it earns this
  196. distinction because the user is freed from much of the overhead
  197. involved in storing and retrieving data that plagues other lan-
  198. guages.  Want to store or retrieve data from disk?  In MUMPS just
  199. put a caret "^" preceding the variable and MUMPS performs all the
  200. necessary chores of storage and retrieval automatically.
  201.  
  202. With MUMPS, sort and merge routines are no longer needed since
  203. the data is stored transparently in a hierarchical base as it is
  204. dynamically created.  Two functions in MUMPS, $ORDER and $DATA,
  205. allow one to efficiently and systematically retrieve and test for
  206. data in the hierarchical base.  MUMPS allows the programmer to be
  207. free of details necessary to construct the physical file struc-
  208. ture so that he or she can concentrate on the a logical file
  209. generation suited to the application.
  210.  
  211. MUMPS has a powerful feature called indirection, that is normally
  212. only found in assembly code.  Indirection uses the value of a
  213. variable or command argument as the address to retrieve another
  214. variable or command argument.  Additionally, MUMPS allows a
  215. string to be executed as if it were code.  This allows the same
  216. segment of MUMPS code to be executed with dynamically changing
  217. data yielding differing results.  The advantage of this technique
  218. is that proven debugged code can utilize different text to per-
  219. form a variety applications.  Example:  write code for a screen
  220. prompter to input data, filter input, re-prompt for errors, and
  221. finally store the data in a file.  Solution:  Write the code
  222. using indirection then design a table of strings unique to the
  223. application.  If you need to write new screen prompter applica-
  224. tion just build a new application table for your pre-written
  225. debugged code.  Indirection can be nested allowing even greater
  226. flexibility.
  227.  
  228. MUMPS has many of the features found in other languages:  arith-
  229. metic and Boolean operators, output formatting, looping, subrou-
  230. tines, conditionals, etc.  Additionally MUMPS has unique features
  231. that allow the user access to time of day and date and to associ-
  232. ate timing constraints with many operations.  These features are
  233. invaluable for testing terminal malfunctions, prompting users in
  234. a time critical dialogue, automating unattended procedures, and a
  235. host of other considerations. 
  236.  
  237.  
  238. (Q) - Can you cite some specific examples of your above claims
  239. for MUMPS.
  240.  
  241. (A) - Perhaps the best way to get the flavor of MUMPS (in addi-
  242. tion to the references given at the end of this article) is to
  243. attend the annual MUG meeting where you can witness papers,
  244. tutorials, and demonstrations that can best answer your question
  245. I will cite quotes from two references to illustrate the compara-
  246. tive power of MUMPS.
  247.  
  248.      1.  From "A case for Mumps" by Casimiro Alonso in
  249.      COMPUTERWORLD magazine, January 9, 1984, pages 27-32:
  250.  
  251. "In benchmark tests to determine the systems vendor for a retail-
  252. ing application, MUMPS -- perhaps surprisingly -- proved the
  253. superior choice for programming language performance."
  254. -----------------------------------------------------------------
  255. |            |    IBM                                           |
  256. | 32 Bit     | System/38   Data General   Honeywell     Nixdorf |
  257. | Systems    |  Model 5      MV/60000       6/92        8890/30 |
  258. |            |  RPG-III       Cobol         Cobol        Cobol  |
  259. |---------------------------------------------------------------|
  260. |Data base   | 1 hour,       6 hours       1 hour,      1 hour, |
  261. | creation   |  50 min.                     5 min.       6 min. |
  262. |---------------------------------------------------------------|
  263. |Long query  |  4 min.       4 min.,       1 min.,      4 min., |
  264. |            |                30 sec.       25 sec.    1.1 sec. |
  265. |---------------------------------------------------------------|
  266. |Short query |  1 sec.        1 sec.       1 sec.       1 sec.  |
  267. |---------------------------------------------------------------|
  268. |Data base   |                                                  |
  269. |occupation  |  23,403       22,500        14,799       23,831  |
  270. |(K bytes)   |                                                  |
  271. |---------------------------------------------------------------|
  272. |Lines of    |   835         1,150          2,219        3,239  |
  273. |  code      |                                                  |
  274. -----------------------------------------------------------------
  275.                      TABLE I (part 1)
  276.  
  277. -------------------------------------------------------------
  278. | 16 Bit         |     DEC         HP 3000     Microdata    |
  279. | Systems        |  PDP-11/44                 Reality 2000  |
  280. |                |    MUMPS        Fortran       Basic      |
  281. |-----------------------------------------------------------|
  282. |Data base       |    32 min       3 hour,       48 min     |
  283. | creation       |                  30 min                  |
  284. |-----------------------------------------------------------|
  285. |Long query      | 3min,55sec     2min,30sec     15 min     |
  286. |(17,000 records)|                                          |
  287. |-----------------------------------------------------------|
  288. |Short query     |   <1 sec        >2 sec        18 sec     |
  289. |-----------------------------------------------------------|
  290. |Data base       |                                          |
  291. |occupation      |   6,073         23,083        3,000      |
  292. |(K bytes)       |                                          |
  293. |-----------------------------------------------------------|
  294. |Lines of        |    183          2,684          391       |
  295. |  code (source) |                                          |
  296. -------------------------------------------------------------
  297.                      TABLE I (part 2)
  298.  
  299.  
  300. "MUMPS performed much better than the other languages on almost
  301. every comparison run (see TABLE I, parts 1 & 2).  On the data
  302. base creation MUMPS was from half again as fast to 18 times as
  303. fast as the other systems.  The MUMPS data base also occupied
  304. only one half to one-fourth of the disk space required by
  305. others.  And MUMPS programming required one-third fewer lines of
  306. code.
  307.  
  308. "In summary, in different comparisons on various machines, MUMPS
  309. was bested only once.
  310.  
  311. "A more significant fact is that a Digital Equipment Corporation
  312. PDP-11/44, running MUMPS, actually out-performed all 16-bit and
  313. most 32-bit minis on most of the tests.
  314.  
  315. "This data indicates that a user choosing MUMPS software for
  316. interactive data base applications can expect up to five times
  317. more power from a given computer.  And this power, in turn, will
  318. eliminate many of the performance problems encountered by mini-
  319. computers in administrative environments.
  320.  
  321. "In addition, the data laid to rest the criticism that the MUMPS
  322. "interpreter" approach imposes performance penalties on applica-
  323. tions.  The results clearly show that MUMPS is not at all slower
  324. than other software.  Indeed, it offers an incredible performance
  325. increase over competitive systems.
  326.  
  327. "For these reasons, we decided to recommend that our client go
  328. with a MUMPS applications program."
  329.  
  330. "On this recommendation, we were selected, and our customer
  331. ordered three VAX systems as described above.  They are now up
  332. and running.
  333.  
  334. "Prior to installation, the customer was able to save consider-
  335. able development time by assigning three programmers and a system
  336. analyst, none with prior MUMPS experience, to develop and test
  337. applications on our in-house PDP-11.  This development work was
  338. possible because no conversion was needed when the applications
  339. moved later to the VAX.
  340.  
  341. "The applications development took about one-third the amount of
  342. time that had been forecast for the use of other languages. 
  343. Seven complex applications were developed in a space of about
  344. four months.
  345.  
  346. "In addition, the customer got a bonus in disk space savings,
  347. which provides growth potential and a future possibility of
  348. saving money in disk configuration."
  349.  
  350.  
  351.      2.  From "A linguistic comparison of MUMPS and COBOL" by
  352.      Thomas Munnecke -- National Computer Conference 1980:
  353.  
  354. "The author once translated a COBOL program into MUMPS.  The
  355. COBOL program was part of a payroll system which received a batch
  356. of time and attendance records and computed the gross and net
  357. pays, various leave balances, and the like.  The MUMPS version
  358. replaced the batch system with on-line data entry and validation,
  359. with immediate computations.  Thus, the MUMPS version had more
  360. work to do.
  361.  
  362.            ITEM                  COBOL           MUMPS
  363.         ----------------------------------------------
  364.         Lines of code            3600             300
  365.         "IF" statements           460              89
  366.         "GOTO" statements         650              43
  367.         Total program size        120k              9k
  368.  
  369. The MUMPS version required approximately 8% of the lines of code,
  370. 19% of number of conditional checks (even with the added validity
  371. checks), 6% of the programming branches, and 8% of the run-time
  372. memory.
  373.  
  374. Execution time on a $100,000 MUMPS minicomputer was approximately
  375. twice as long as the several million dollar COBOL/IBM 370/158
  376. computer.  Exact programing times were hard to estimate, but
  377. three weeks were spent on the MUMPS version, while the original
  378. COBOL version took an estimated six to nine months."
  379.  
  380. (Q) - What do you see as the future for MUMPS.
  381.  
  382. (A) - The adoption of MUMPS as a standard language by the Amer-
  383. ican National Standards Institute (ANSI) requires a deliberate
  384. conservative pace for changes in the language.  This may be why
  385. MUMPS is the only truly transportable language.  New additions
  386. and changes are proposed by the MUMPS Development Committee
  387. (which meets two to three times a year), after long discussion
  388. and much debate.  Changes accepted by the committee then go
  389. through a series of releases and are field tested by vendors
  390. which finally, when proven, are recommended for incorporation
  391. into the Standard.  ANSI then reviews the recommendation for
  392. adopting the changes.  This procedure insures against ad hoc
  393. changes from multiple sources with the great frequency that
  394. plagues other languages, all in the name of enhancements.
  395.  
  396. MUMPS is in fact not a static language.  There are a number of
  397. "A" and "B" so called releases presently that will ultimately be
  398. incorporated into the standard and the Development Committee
  399. continues to insure the deliberate on-going evolution.
  400.  
  401.  
  402. (Q) - What can be said about MUMPS for the average programmer?
  403.  
  404. (A) - MUMPS can be learned with the same ease that one learns
  405. BASIC.  You don't need to be a super brain to program in MUMPS. 
  406. You don't need to be a computer genius to write complex applica-
  407. tions in MUMPS.  MUMPS provides the tools for all programmers to
  408. generate sophisticated, useful applications with a minimum of
  409. effort.  
  410.  
  411.  
  412. REFERENCES:
  413.  
  414. 1.  STANDARD MUMPS POCKET GUIDE
  415.     (Joel Achtenberg)
  416.  
  417. 2.  ANSI MUMPS PROGRAMMERS' REFERENCE GUIDE
  418.     (MUMPS Users' Group, 1981)
  419.  
  420. 3.  COMPUTER PROGRAMMING IN STANDARD MUMPS: Second Edition (1984)
  421.     (Arthur F. Krieg, David H. Miller, and Gregory Bressler)
  422.  
  423. 4.  MUMPS PRIMER REVISED (1983)
  424.     (R. F. Walters, J. Bowie, and J. C. Wilcox)
  425.  
  426. 5.  A COOKBOOK OF MUMPS (1985)
  427.     (David B. Brown and Donald H. Glaeser, D.Sc.)
  428.  
  429. 6.  THE MUG QUARTERLY
  430.     (MUMPS Users' Group)
  431.  
  432.  
  433. The above publications may be obtained through the:
  434.  
  435.     MUMPS USERS' GROUP
  436.     4321 HARTWICK ROAD, SUITE 510
  437.     COLLEGE PARK, MD 20740
  438.  
  439.  
  440. 7.  COMP COMPUTING STANDARD MUMPS (1985)
  441.      (David Brown, Gladys Brown, and Melvin Goldstein)
  442.  
  443. 8.  COMP COMPUTING STANDARD MUMPS SYSTEM/APPLICATIONS
  444.      (Comes with MUMPS tutorial and MUMPS operating system
  445.      for Micros: CCSM    for Macs: MacMUMPS) available from:
  446.  
  447.     M-GLOBAL                      PHONES
  448.     1601 Westheimer, Suite 201      within Texas: (713) 529-5276
  449.     Houston, Texas  77006           out-of-state: (800) 257-8052
  450.